//
//  USChatCell.h
//  us
//
//  Created by karry on 2025/4/6.
//

#import <UIKit/UIKit.h>
#import "USMessageViewModel.h"
#import "USChatKit.h"
#import "USSendStatusView.h"
NS_ASSUME_NONNULL_BEGIN

@protocol USChatCellDelegate;

@interface USChatCell : UITableViewCell<USSendStatusViewDelegate>

@property (nonatomic, weak) id<USChatCellDelegate> delegate;

@property(nonatomic,strong) USMessageViewModel *messageViewModel;

//时间
@property(nonatomic,strong) UILabel *timeLab;

///消息发送状态
@property(nonatomic,strong) USSendStatusView *sendStatusView;

///未读状态
@property(nonatomic,strong) UIView *unReadView;
 

//头像
@property (nonatomic,strong) CharacterView *avatarImageView;

//放视图
@property(nonatomic,strong) UIView *messageContentView;

@property (nonatomic, copy) void(^onMenuAction)(NSString *actionType); // 回调选中项

- (void)setupView;
- (void)updateLayout;

- (void)setReadStatusHidden:(BOOL)isHidden;

@end

@protocol USChatCellDelegate <NSObject>

@optional

- (void)messageCellDidSelected:(USChatCell *)aCell;
 
- (void)messageCellDidResend:(USChatCell *)cell;

- (void)messageCellDidLongPress:(USChatCell *)aCell bubbleView:(UIView *)bubbleView;

- (void)avatarDidSelected:(USMessageViewModel *)viewModel;

@end

NS_ASSUME_NONNULL_END
